#pragma once
#include <modbus.h>
#include <string>

#ifdef _MSC_VER
#   define EXPORT_API __declspec(dllexport)
#else
#   define EXPORT_API __attribute__((visibility("default")))
#endif

extern "C" {
	EXPORT_API BOOL create_modbus_client(const char* port_name, int baudrate);

	EXPORT_API void set_slave(int slave_id);

	EXPORT_API int read_detector(int detector_address, int detector_count, float* values, char* const errmsg);

	EXPORT_API void stop_modbus();

}

